package com.mt.api.modules.controller;

import com.mt.common.response.WebResponse;
import com.mt.api.modules.domain.vo.RoleMenuDetailVo;
import com.mt.api.modules.service.IRoleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: plover
 * @Date: 2022-04-30
 * @Description:
 */
@Slf4j
@RestController
@RequestMapping("/app/role")
public class RoleController {

    @Autowired
    private IRoleService roleService;

    @GetMapping("/list")
    public WebResponse getRoleList() {
        return roleService.getRoleList();
    }

    @GetMapping("/detail")
    public WebResponse<RoleMenuDetailVo> roleDetail(Integer id) {
        return roleService.roleDetail(id);
    }
}